<html layout:decorate="~{default/layout}" xmlns:layout="http://www.w3.org/1999/xhtml">
<head>
    <script>

        $(function(){
            //设置点击 class
            var url = document.URL;
//            alert(url);
            if (url.indexOf("index_list") > 0) {
                $('#index').addClass("active");
            }
            if (url.indexOf("warn_list") > 0) {
                $('#warn').addClass("active");
            }
            if (url.indexOf("status_list") > 0) {
                $('#status').addClass("active");
            }
            if (url.indexOf("property_list") > 0) {
                $('#property').addClass("active");
            }
            if (url.indexOf("order_list") > 0) {
                $('#order').addClass("active");
            }
            if (url.indexOf("threshold_list") > 0) {
                $('#threshold').addClass("active");
            }
            if (url.indexOf("type_list") > 0) {
                $('#type').addClass("active");
            }
        });

        function getTableData (dataFormat,id) {
            $("#"+id).bootstrapTable({
                method:"get",
                sidePagination:"server",
                dataType: "json",
                toolbar: '#toolbar',
                queryParams: function queryParams(params) {   //设置查询参数
                    var param = {
                        pageNum: params.offset/params.limit,
                        sortOrder: params.order,//排序
                        sortName:params.sort//排序字段
                    };
                    $(".search-data").each(function () {
                        var key = $(this).attr("name");
                        var val = $(this).val();
                        param[key] = val;
                    });
                    console.log(param);
                    return param;
                },
                columns:dataFormat
            });
        }

    </script>
</head>
<body>
<div layout:fragment="content">
    <div class="main-content-inner">

        <div class="breadcrumbs ace-save-state" id="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="ace-icon fa fa-home home-icon"></i>
                    <a href="#">主页</a>
                </li>
                <li class="active">客户购车系统</li>
                <li class="active">参数管理</li>
            </ul><!-- /.breadcrumb -->
        </div>
        <div style="display: none;">
            <ul class="nav nav-tabs">
                <li role="presentation" id="index"><a href="/project/paramSettingManage/param_list">参数修改</a></li>
            </ul>
        </div>

        <div class="page-content" layout:fragment="content_list">
    </div>

</div>
</body>
</html>